p = float(input().split()[0])
if p >= 1000 :
	p = p - 300
elif p >= 500 :
	p = p - 100
elif p >= 300 :
	p = p - 50
print("%.2lf" %p)